Skip to content

Create Django templatetags #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Jul 22, 2021

Barebones structure to allow for a user to simply type

{% load idom %}
<head>
   {% idom_scripts %}
</head>

<body>
   {% idom_view 'root' %}
</body>

to import IDOM into Django.

note: these template tags are only registered if the user adds "django_idom" to settings.py:INSTALLED_APPS

As I mentioned, there is gonna be some slight awkwardness to this due to build.js not being built directly to django_idom/static/js/idom.js. However, that can be resolved via modifying our deployment procedure.

I've included some HTML and JS comments just for our sake. We'll remove them before we merge this PR.

Alternatively, we can have idom.js point to JavaScript stored on a CDN somewhere rather than locally deploying. But, many Django users due prefer local files due to things such as Django-Compressor and Django-Pipelines though.

@Archmonger Archmonger changed the title Create barebones Django templatetags Create Django templatetags Jul 22, 2021
@Archmonger
Copy link
Contributor Author

@rmorshea Let's schedule something out this weekend to discuss this.

@Archmonger
Copy link
Contributor Author

Also heads up,

npm WARN deprecated [email protected]: This module has moved and is now available at @rollup/plugin-replace. Please update your dependencies. This version is no longer maintained.
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.

attempt re-adding tag stuff

styling fix
@rmorshea rmorshea marked this pull request as draft July 22, 2021 17:13
@rmorshea
Copy link
Contributor

@Archmonger how about Sunday at 11am?

@Archmonger
Copy link
Contributor Author

Archmonger commented Jul 22, 2021

@Archmonger how about Sunday at 11am?

Sounds good

@rmorshea
Copy link
Contributor

closing in favor of #3

@rmorshea rmorshea closed this Jul 26, 2021
@Archmonger Archmonger deleted the add_template_tags branch July 3, 2022 08:49
@Archmonger Archmonger restored the add_template_tags branch July 3, 2022 08:49
@Archmonger Archmonger deleted the add_template_tags branch July 3, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants